"""
107-3.6
"""
for x in range(0,100):
    if((x % 3 == 0 and x % 7 !=0)or(x % 3 != 0 and x % 7 ==0)):
        print(x)
print()
x = 1
print(f"{x}")
y = 1
print(f"{y}")
for z in range(10):
    z = x + y
    print(f"{z}")
    x = y + z
    print(f"{x}")
    y = z + x
    print(f"{y}")